package com.yue.se.thread.test;

import java.util.concurrent.TimeUnit;

/**
 * Created by yueyang on 2016/8/28.
 */
public class C {
    private boolean lianOn = false;

    public synchronized void zijian() throws InterruptedException {
        System.out.println("质检");
        System.out.flush();
        System.out.println("连接MDB");
        System.out.flush();
        wait();
    }

    public synchronized  void lianjie() throws InterruptedException {
        TimeUnit.SECONDS.sleep(2);
        notify();
    }
}
